import {
	getHospList,
	getDoctorList,
	enterDeptMiddlePage
} from '@/api/order.js'


const state = {
	hotDoc: [], //紧俏医生，医生中间页数据
	hotDep:[],  //科室中间页数据
};

const mutations = {
	GETDOCLIST(state, res) {
		state.hotDoc = res
	},
	GETKESHILIST(state, res) {
		//console.log(res,'00000')
		state.hotDep = res
	}
};

const actions = {
	async doclist({commit}, data) {
		let res = await getDoctorList(data)
		commit('GETDOCLIST', res)
		//return '111'
	},
	async keshilist({commit}, data) {
		let res = await enterDeptMiddlePage(data)
		//console.log(res,'!!!')
		commit('GETKESHILIST', res)
	}
};

export default {
	state,
	mutations,
	actions
};
